home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore 64 Scene Diskmags Assortment
/
Commodore_CEE_Vol._1_Issue_05_1995_Jack_Vander_White_Disk_1_of_3_Side_A.d64
/
reply doc 3
< prev
next >
Wrap
Text File
|
2023-02-26
|
8KB
|
176 lines
MERGING TEXT FILES
Here's how you do it...load the first file and place the cursor past the last
line in the file (in the edit mode). Press the STOP key to take you back to
the menu and load the second file. The second file will start loading from
the line you left the cursor on when you went to the menu. Armed with that
information, one could merge (or insert) text from one file into another just
by leaving the cursor in the appropriate place in the text. You can even do
a "cut and paste" operation by opening up a gap in your text with CTRL i and
merging text from another file into the gap.
PRINTING A FILE
A bit of background on the editor's printing routine will help you get it set
up for your particular printer. First, let's follow the printing prompts.
You will be prompted first for the place to start printing (from the
beginning line or from the last line the cursor was on).
Next, right justification instructions. Right justification will happen only
on lines with 10 or less spaces at the end of the line, and only if the line
has at least 4 words on it (formatting safety precautions). These precautions
are necessary to prevent "ugly" lines with 4 or more spaces between words.
Next prompt is for enhanced print (user-defined...more on this later).
Next is linked printing prompt. This is for documents too big to fit into the
workspace all at once, and had to be saved in two or more files. Answering
"yes" to this prompt will cause the line counter to remember the number of
the last line it printed (so that it can page properly on a linked document).
For example, let's say you wanted to print a large document that was saved in
three files. On the first file, you would answer "no" to the prompt, but on
each of the next files, answer "y".
Next prompt is for the number of copies you want. This prompt will not be
offered if you answered "y" to the linked printing prompt.
The last prompt gives you a chance to abort printing before it starts.
Answering yes will start printing. You can stop printing (if you have to)
with the STOP key at any time. If you do, you'll be returned to the editor's
menu screen.
TECHNICAL INFO
Two files are opened to the printer. One file is used to send commands, the
other is for text. Most non-CBM printer/interface setups allow the option of
choosing secondary addresses...usually, a secondary address of 7 is used for
upper and lower case printing, and allows conversion of PETascii to standard
ascii when sending text. Also, you can usually choose a secondary address for
what is commonly called a "transparent" mode (sending data without any
translation). On CARDCO interfaces this is 4 or 5. The editor's printing
routine is set to open files of 7,4,7 (text) and 5,4,5 (commands). The
transparent mode was chosen for commands so that you don't have to worry
about them being translated into something else on the way to the printer.
Saves a lot of confusion and weird printer antics. One rule here...you must
use different file numbers for text and command files (how to choose them
later).
The first thing the printing routine will do is send a "setup" string to your
printer. A setup string is a string of codes that one would usually use to
ensure the printer is set to all default conditions, or to make certain
special functions are set the way you want them to be. This string should
also contain the codes to disable enhanced print and underlining. You can
define this string (instructions in a moment).
Then, if you selected enhanced print, another string is sent. These are
usually the codes that enable boldface print, italics, or whatever other
feature you wish to define as enhanced print.
Next, the document is printed. Depending on how you answered the printer
prompts, you could right-justify the lines, print the document in boldface,
or both at once.
SETTING UP THE STRINGS
There are 4 strings you will have to define according to your individual
printer/interface setup. The printing routine will work if you don't, but all
strings will be sent as null strings unless you define them. This means that
your printer cannot underline or do enhanced printing as commanded from the
printing routine until you define the command strings.
The command strings are stored in a table as a series of bytes. Let's take
the setup string first (example is in decimal).
byte1 byte2 byte3 byte4 byte5 byte6
2 27 64 -- -- --
The codes for my printer to clear to all default values are 27 and 64. The
first byte in the setup string (byte1) should be the length of the string.
Then the actual codes should follow in the succeeding bytes. The setup string
can contain up to 32 bytes (length byte + 31 codes). If you had a string to
send like this... 27,64,27,45,27,88,27,92...the table should look like this:
8 27 64 27 45 27 88 27 92
The next string in the table contains the enhanced printing codes. These
codes can be for whatever you want to use for enhanced printing (boldface,
italics, shadow print, etc.). Same rules as in the setup string, but the
maximum string length is 16 bytes.
The third string is for enabling underlining. 16 bytes max.
The last string is for disabling underlining. 16 bytes max.
DEFINING THE FILES/SECONDARY ADDRESSES
The editor is defaulted to use a secondary address of 7 (in the file opening
command "open 7,4,7") for text. This will cause the printer/interface (in my
case) to expect CBM ascii (upper and lower case), and will perform a carriage
return and linefeed when it receives a carriage return. If you need a
different secondary address for this to happen with your printer, you should
reset this number to the value you need.
5 is the default secondary address for the command file (open 5,4,5). This is
the file that the editor uses to send command strings to the printer. No
translation of the codes should take place through this file. Carriage
returns will not be sent, so it doesn't matter if this address causes a
carriage/linefeed when it gets a carriage return...it'll never get one, just
escape codes/command strings.
If you want to communicate with your printer in standard ascii, all you have
to do is change a flag (details soon). When you set the flag for ascii, the
editor will also send a linefeed after each carriage return. Example:
For a CARDCO interface and Prowriter 8510 printer, if you want to communicate
in standard ascii, set the ascii flag to 0, the secondary address for text to
5 (transparent mode, no linefeed) and the secondary address for commands to
4 (transparent mode, linefeed doesn't matter).
Note that although both files are transparent mode, I chose different
addresses for text and command files. This is because the secondary address
number is also used as the file number. If the numbers were the same, the
editor would try to open the same file twice, and terminate with an error
message whenever you tried to print.
MODIFYING THE EDITOR CODES/STRINGS
Load the wedge, but don't run it. Now you can poke the changes into the
tables and resave the new wedge. Here are the locations you will need:
HEX DECIMAL
Ascii/ CBMascii flag -> $117c 4476 (zero for ascii, 255 for CBM)
Text file # -> $1347 4935
Command file # -> $134b 4939
Setup string -> $2436 9270 to 9301
Enhanced string -> $2456 9302 to 9317
Underline "on" string-> $2466 9318 to 9333
U/l "off" string -> $2476 9334 to 9349
You can make the changes with an ML monitor, or poke them in from basic.
Either way, it may help to make up a chart to aid you in making the changes.
Also, never set the length byte of any of the 4 command strings to zero, or
you'll get very strange results. If you want the editor to ignore the string,
set the first byte to 1 and the second to zero. All 4 strings are set this
way initially anyway, ready for you to redefine them.
Well, that's about it.
-----------------------------------